package cn.dakaqi.services;

import cn.dakaqi.entities.GroupVolunteer;
import cn.dakaqi.entities.user.Volunteer;
import cn.dakaqi.utils.exception.ServiceRuntimeException;
import org.springframework.data.domain.Page;

import java.util.List;

/**
 * @author chunyang on 2016/4/16.
 */
@SuppressWarnings("unused")
public interface GroupVolunteerService {
    void save(String jsonData) throws ServiceRuntimeException;

    GroupVolunteer save(GroupVolunteer volunteer) throws ServiceRuntimeException;

    void importData(GroupVolunteer volunteer) throws ServiceRuntimeException;

    void del(Long id) throws ServiceRuntimeException;

    void update(GroupVolunteer groupVolunteer) throws ServiceRuntimeException;

    void setAdmin(String jsonData) throws ServiceRuntimeException;

    void setAdmin(Long id, int status, String memberCode) throws ServiceRuntimeException;

    GroupVolunteer findOne(Long id) throws ServiceRuntimeException;

    Page<GroupVolunteer> queryMemberCode(String memberCode, int status, int pageNumber) throws ServiceRuntimeException;

    Page<GroupVolunteer> queryGroupCode(String groupCode, int status, int pageNumber) throws ServiceRuntimeException;

    List<GroupVolunteer> queryGroupCode(String groupCode) throws ServiceRuntimeException;

    GroupVolunteer findMemberLast(String memberCode) throws ServiceRuntimeException;

    GroupVolunteer findByMemberAndGroup(String memberCode, int status, String groupCode) throws ServiceRuntimeException;

    void updateStatus(String jsonData) throws ServiceRuntimeException;

    void updateStatus(Long id, int status, String memberCode, String refuseCase) throws ServiceRuntimeException;

    int counts(Long groupId, int status) throws ServiceRuntimeException;

    List<GroupVolunteer> findByAdmin(String memberCode) throws ServiceRuntimeException;

    void setDemo(String param) throws ServiceRuntimeException;

    void setDemo(Long groupVolunteerId, String demo) throws ServiceRuntimeException;

    void expel(String param);

    void expel(Long groupVolunteerId,String reason) throws ServiceRuntimeException;

    void exit(String param) throws ServiceRuntimeException;

    void exit(GroupVolunteer groupVolunteer) throws ServiceRuntimeException;

    Page<GroupVolunteer> findNameLike(String groupCode, String name) throws ServiceRuntimeException;

    Page<GroupVolunteer> findByJob(String groupCode, String job) throws ServiceRuntimeException;

    Page<GroupVolunteer> findBySkill(String groupCode, String skill) throws ServiceRuntimeException;

    Page<GroupVolunteer> findByStatus(String groupCode, int status) throws ServiceRuntimeException;

    Page<GroupVolunteer> findByServiceField(String groupCode, String serviceField) throws ServiceRuntimeException;

    List<GroupVolunteer> findAdminByGroup(String groupCode) throws ServiceRuntimeException;

    Page<GroupVolunteer> findByVolunteerName(String groupCode, String name, int pageNumber);

    GroupVolunteer searchMonitor(String groupCode, String realName) throws ServiceRuntimeException;

    Page<GroupVolunteer> findByGroup(String groupCode, int pageNumber, int unLock) throws ServiceRuntimeException;

    void save(Volunteer volunteer, String groupCode) throws ServiceRuntimeException;

    void freeze(Long id, int status, String memberCode, String cause) throws ServiceRuntimeException;

    void freeze(String param) throws ServiceRuntimeException;
}
